Skip to content

errors: add NOT_READY code#4

Merged
Mlaz-code merged 1 commit into
mainfrom
audit/errcodes-not-ready
Apr 24, 2026
Merged

errors: add NOT_READY code#4
Mlaz-code merged 1 commit into
mainfrom
audit/errcodes-not-ready

Conversation

@Mlaz-code
Copy link
Copy Markdown
Contributor

Summary

Mirrors `errcodes.NotReady` added upstream in sharp-api-go (PR: https://github.com/Mlaz-code/sharp-api-go/pull/46) for the 503 emitted when a backing store (ClickHouse, closing-line capture) isn't yet ready to serve the request.

Adds:

  • `NOT_READY = "not_ready"` constant
  • Entry in `ERROR_CODE_DESCRIPTIONS`
  • Mapping to `SharpAPIError` in `ERROR_CODE_TO_EXCEPTION` (fall-through branch, same recovery as `SERVICE_UNAVAILABLE`)

Test plan

  • `pytest tests/test_client.py` — 30/30 pass
  • `python -c 'from sharpapi.exceptions import NOT_READY'` resolves

🤖 Generated with Claude Code

Mirrors errcodes.NotReady ("not_ready") added upstream in sharp-api-go
for the 503 emitted when a backing store (e.g. ClickHouse, closing-line
capture) isn't yet ready to serve the request. Maps to SharpAPIError
via the fall-through branch (same recovery as SERVICE_UNAVAILABLE).
@Mlaz-code Mlaz-code merged commit 4051a1c into main Apr 24, 2026
@Mlaz-code Mlaz-code deleted the audit/errcodes-not-ready branch April 24, 2026 15:40
Mlaz-code added a commit that referenced this pull request May 7, 2026
Mirrors NotReady ("not_ready") added upstream server-side
for the 503 emitted when a backing store (e.g. ClickHouse, closing-line
capture) isn't yet ready to serve the request. Maps to SharpAPIError
via the fall-through branch (same recovery as SERVICE_UNAVAILABLE).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant